package com.wr.boot;

import com.wr.client.UserClient;
import com.wr.client.handler.UserClientHandler;
import com.wr.service.UserService;

/**
 * @author 王瑞
 * @description: TODO
 * @date 2020/3/21  21:12
 */
public class ClientBootStrap {

    public static void main(String[] args) throws InterruptedException {

        UserClient userClient = new UserClient();
        UserService proxy = (UserService) userClient.createProxy(UserService.class);
        while (true){
            Thread.sleep(2000);
            System.out.println("代理对象已经被创建...");
            String result = proxy.sayHello("wangzuoyi");
            System.out.println("响应结果："+result);

        }
    }
}
